<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    html {
      height: 200vh;
      background-image: linear-gradient(black, white);
    }
  </style>
</head>

<body>
  <script>
    /**
     * clientX
     * clientY
     * 
     * pageX
     * pageY
     * 
     * screenX
     * screenY
     */
    document.documentElement.addEventListener('click', function (event) {
      // 相对于浏览器显示区域左上角
      console.log('相对于浏览器显示区域左上角')
      console.log(event.clientX, event.clientY)

      // 相对于文档左上角
      console.log('相对于文档左上角')
      console.log(event.pageX, event.pageY)

      // 相对于屏幕左上角
      console.log('相对于屏幕左上角')
      console.log(event.screenX, event.screenY)
    })
  </script>
</body>

</html>